package 线程的第二种实现方式;

public class 测试类 {
    public static void main(String[] args) {
        MyRunnable mr = new MyRunnable();
        Thread thread = new Thread(mr);
        thread.setName("二狗");
        thread.start();
        String name = thread.getName();
        System.out.println(name);
    }
}
